This application relates to the digital image processing arts. More particularly, the application relates to a method and apparatus for converting image data from a first bit depth (number of bits per sample) to a second bit depth as required for different image processing modules or operations in an image processing system.
Traditionally, digital image files were created with a variety of bit depths or number of bits per sample (i.e., bits per pixel for monochromatic image data or bits per separation pixel for color image data) ranging from 1-8.
More recently, it is not uncommon for digital image data to be presented in terms of 10-16 bits per sample. Generally, image processing modules are designed to utilize only image data presented in one or two different bit depths, e.g., 1 bit per sample or 8 bits per sample. Because image data is typically encoded in many different formats, each having a different number of bits per sample, it is necessary for image processing modules to use a bit conversion library to perform bit conversion operations among the different encoding formats as needed in a quick and efficient manner.
Heretofore, such bit conversion operations have been performed in image processing systems from an input bit depth to a desired or working bit depth on an individual sample-by-sample basis for each scan line of an image without regard to any periodic relationship between the input bit depth and the output bit depth. In this prior approach, the bits for each individual sample are extracted from a scanline and converted to the desired format through use of some non-optimized conversion algorithm. This individual sample-by-sample conversion method is relatively slow and inefficient due to the fact that input scanlines are often arbitrary in length and the input sample bit depth is generally not in terms of a standard computational data length, i.e., not a byte (8 bits) or some multiple thereof. This increases the number of steps required to extract the subject data bits from the input scanline, and consequently results in use of excessive amounts of valuable computational time.
In modern image processing systems, high speed data processing is essential. As such, it has been deemed desirable to develop a new and improved method and apparatus for performing optimized bit conversion operations in a high speed and efficient manner.